#include "leaderboardui.h"
#include <stdio.h>

void leaderboardPrint(const Leaderboard* lb) {
    printf("\n\033[1;34m╔════════ Leaderboard ════════╗\033[0m\n");
    printf("\033[1;34m│\033[0m \033[1;36m%-4s %-10s %-6s\033[0m \033[1;34m│\033[0m\n", "Rank", "Name", "Score");
    for (int i = 0; i < lb->count; i++) {
        if (i == 0)
            printf("\033[1;33m│ %-4d %-10s \033[0m│ \033[1;32m%6d\033[0m \033[1;34m│\033[0m\n", i+1, lb->players[i].name, lb->players[i].score);
        else
            printf("\033[1;37m│ %-4d %-10s \033[0m│ \033[0;32m%6d\033[0m \033[1;34m│\033[0m\n", i+1, lb->players[i].name, lb->players[i].score);
    }
    printf("\033[1;34m╚═════════════════════════════╝\033[0m\n");
} 